<template>
  <div id="OrdersTitle">
    <v-details
      :inputConfig="inputConfig"
      :detailData="inputData"
      :rules="rules"
      ref="input"
      @changeData="changeData"
    ></v-details>
  </div>
</template>

<script>
import details from 'commons/Detail'
import baseMixin from "@/mixins/BaseMixin";

export default {
  props: {
    inputData: {
      type: Object,
    }
  },
  mixins: [baseMixin],
  name: "OrdersTitle",
  data () {
    return {}
  },
  computed: {
    inputConfig () {
      return [
        [
          {
            type: "input",
            label: this.$t('out.wavekey'),
            props: "wavekey",
            disabled: true
          },
          {
            type: "input",
            label: this.$t('common.desc'),
            props: "descr",
          },
          {
            type: "select",
            label: this.$t('common.status'),
            props: "status",
            options: this.getOptions("querycodeLkup/WAVESTATUS"),
            disabled: true
          },
          {
            type: "date",
            label: this.$t('app.createDate'),
            props: "adddate",
          },
          {
            type: "input",
            label: this.$t('app.createName'),
            props: "addwho",
            disabled: true
          },
        ],
        [
          {
            type: "input",
            label: this.$t('wave.totalorders'),
            props: "sumtotalorders",
            disabled: true
          },
          {
            type: "input",
            label: this.$t('wave.totallines'),
            props: "sumtotallines",
            disabled: true
          },
          {
            type: "input",
            label: this.$t('in.totalpoqty'),
            props: "sumtotalquantitys",
            disabled: true
          },
          {
            type: "input",
            label: this.$t('wave.totalgrosswgt'),
            props: "sumtotalweights",
            disabled: true
          },
          {
            type: "input",
            label: this.$t('out.totalcube'),
            props: "sumtotalcubes",
            disabled: true
          }
        ],
        [
          {
            type: "select",
            label: this.$t('out.wavetype'),
            props: "rtxwavetype",
            options: this.getOptions("querycodeLkup/RTXWAVETYPE"),
            disabled: true
          },
          {
            type: "select",
            label: this.$t('wave.rtxfclrelease'),
            props: "rtxfclrelease",
            options: this.getOptions("querycodeLkup/RTXYESNO")
          },
          {
            type: "select",
            label: this.$t('wave.rtxpieprelease'),
            props: "rtxpieprelease",
            options: this.getOptions("querycodeLkup/RTXYESNO")
          },
          {
            type: "input",
            label: this.$t('wave.rtxtaskgrpnumber'),
            props: "rtxtaskgrpnumber",
          },
          {
            type: "checkbox",
            label: this.$t('wave.rtxeapick'),
            props: "rtxeapick",
          },

        ],
      ]

    },
    rules () {
      return {
        wavekey: [
          { required: true, trigger: 'blur' },
        ],
        status: [
          { required: true, trigger: 'blur' },
        ],
        adddate: [
          { required: true, trigger: 'blur' },
        ],
        sumtotalorders: [
          { required: true, trigger: 'blur' },
        ],
          rtxtaskgrpnumber: [
          { required: true, trigger: 'blur' },
        ]
      }
    }
  },
  methods: {
    changeData (data) {
      this.$parent.updata = data;

    }
  },
  mounted () {
  },
  watch: {},
  components: {
    'v-details': details
  }
}
</script>

<style scoped>
</style>
